function deletePerson(id) {
    $.post("/dormitory_details/delete/" + id, "", function (json) {
        if (json.code === 200) {
            swal({
                title: "移除成功！",
                type: "success"
            });
            //定时刷新页面
            setTimeout(function () {
                window.location.reload();
            }, 2000);
        } else {
            swal("移除失败",  "error");
        }
    }, "json");
}

//deleteDorm

function deleteDorm(id) {
    $.post("/dormitory_details/deleteDorm/" + id, "", function (json) {
        if (json.code === 200) {
            swal({
                title: "移除成功！",
                type: "success"
            });
            //定时刷新页面
            setTimeout(function () {
                window.location.reload();
            }, 2000);
        } else {
            swal("移除失败",  "error");
        }
    }, "json");
}